package umls.expander;

import java.sql.SQLException;
import java.util.HashSet;
import java.util.Set;

import jdbc.UMLS_DB_Interface;

public class KeywordsProva {
	public static void main(String[] args) throws ClassNotFoundException,
			SQLException {

		String username = "abate";
		String password = "7prova7";
		String dbname = "umls";
		String hostname = "jdbc:mysql://192.168.168.131:3306/";
		// String hostname = "jdbc:mysql://bioeda2.polito.it:3306/";

		Set<String> terms = new HashSet<String>();

		UMLS_DB_Interface umlsdb = new UMLS_DB_Interface();

		umlsdb.SetUpConnection(hostname, username, password, dbname);

		// ConceptCandidate candidate = new ConceptCandidate("C0078058",
		// "Vascular Endothelial Growth Factor A");
		//
		// candidate.CreateExpandedConcepts(umlsdb);

		SemGroupConfReader sgcr = new SemGroupConfReader("confsem.txt");

		sgcr.ReadAllowedSemanticGroups();

		sgcr.ReadAllowedSemanticTypes();

		sgcr.PrintAllowedSemanticTypes();

		System.out.println("\t\t---\t\t");

		Term termine = new Term("vegf");

		termine.CreateConcepts(umlsdb);

		System.out.println(termine);
		//
		// ArrayList<String> temp = termine.GetCompleteRelatedTermList();
		//
		// Iterator<String> temp_it = temp.iterator();
		//
		// while (temp_it.hasNext())
		// {
		// String str = temp_it.next();
		// System.out.println(str);
		// terms.add(str);
		// }
		//
		// System.out.println("\n\n\n");
		//
		// Iterator<String> itr = terms.iterator();
		//
		// while (itr.hasNext())
		// {
		// System.out.println(itr.next());
		// }

		// System.out.println(termine.toString());
		//
		// ArrayList<String> temp = termine.GetCompleteRelatedTermList();
		//
		// Iterator<String> temp_it = temp.iterator();
		//
		// while (temp_it.hasNext())
		// {
		// System.out.println(temp_it.next());
		// }
	}
}
